<%@page import="org.springframework.security.core.context.SecurityContextHolder"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	UserInfo user = (UserInfo)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	String username = user.getName();
	String userid = user.getUsername();
	String siteid = user.getSiteId();
	String sitename = user.getSiteName();
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
	String year_moth = sdf.format(new Date());
%>

<div>
	<form  target="_coreIframe" method="post" action="<%=request.getContextPath()%>/check/doAddMend" enctype="multipart/form-data">
		<div class="breadcrumb">
			<div class="bcIcon"></div>
			<ul class="bcNav">
				<li>补卡登记</li>
			</ul>
		</div>
		<input type="hidden" name="siteid" value="<%=siteid%>">	
		<table class="formTable">
			<tr>
				<td class="tdTitle">所属公司：</td>
				<td>
					<input class="inputText xs" type="text" name="sitename" value="<%=sitename %>" readonly>
					<span class="errorTipWrap" id="errorTip_sitename"></span>
				</td>
			</tr>			
			<tr>
				<td class="tdTitle">员工姓名：</td>
				<td>
					<input class="inputText xs" type="text" name="username" value="<%=username %>" readonly>
					<span class="errorTipWrap" id="errorTip_username"></span>
				</td>
			</tr>	
			<tr>
				<td class="tdTitle">员工编号：</td>
				<td>
					<input class="inputText xs" type="text" name="userid" value="<%=userid %>" readonly>
					<span class="errorTipWrap" id="errorTip_userid"></span>
				</td>
			</tr>						
			<tr>
				<td class="tdTitle">补卡类型 ：</td>
				<td>
					<select name="type">
						<option value="0">上班卡</option>
						<option value="1">下班卡</option>
					</select>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">考勤日期：</td>
				<td>
				<input class="inputText xs" type="text" value="" name="checkdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})">
				<span class="errorTipWrap" id="errorTip_checkdate"></span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">时段1：</td>
				<td>
					<input id="time1" name="time1" style="width:80px;">
					<span class="errorTipWrap" id="errorTip_time1"></span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">时段2：</td>
				<td>
					<input id="time2" name="time2" style="width:80px;">
				</td>
			</tr>	
			<tr>
				<td class="tdTitle">时段3：</td>
				<td>
					<input id="time3" name="time3" style="width:80px;">
				</td>
			</tr>					
			<tr>
				<td class="tdTitle">补卡原因：</td>
				<td>
					<input class="inputText xs" type="text"  value="" name="reason">
					<span class="errorTipWrap" id="errorTip_reason"></span>
				</td>
				
				</td>
			</tr>
			<tr>
				<td class="tdTitle"></td>
				<td>
					<div>
						<input class="input-btn-microsoft" type="submit" value="提交">
						<a class="a-btn-microsoft" href="javascript:XF.Check.mendList('<%=year_moth %>','<%=userid %>')">取消</a>
					</div>
				</td>
			</tr>	
		</table>
	</form>
	<iframe id="_coreIframe" name="_coreIframe" style="display: none;"></iframe>
</div>

<script>
	$('#time1').timespinner({
	    showSeconds: false
	});
	$('#time2').timespinner({
	    showSeconds: false
	});
	$('#time3').timespinner({
	    showSeconds: false
	});	
</script>

